﻿<Window x:Class="ThanNhanTao.frmLogin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
        dxc:ThemeManager.ThemeName="Office2007Blue" Icon="/ThanNhanTao;component/Images/iconbv48x48.ico"             
        Title="Đăng nhập" WindowStartupLocation="CenterScreen" WindowStyle="None" Width="490" Height="350"
        AllowsTransparency="True" ResizeMode="NoResize" Background="Transparent" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
        >
    <Window.Resources>
        <Style x:Key="ButtonDangNhap" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Image x:Name="Vector_Smart_Object2" Source="/ThanNhanTao;component/Images/Icons/nhan_bn_cap_cuu.png" />
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True" />
                            <Trigger Property="IsDefaulted" Value="True" />
                            <Trigger Property="IsMouseOver" Value="True" />
                            <Trigger Property="IsPressed" Value="True" />
                            <Trigger Property="IsEnabled" Value="False" />
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </Style>
        <Style x:Key="ButtonDong" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Image x:Name="Vector_Smart_Object2" Source="/ThanNhanTao;component/Images/Icons/close-32x32.png" />
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True" />
                            <Trigger Property="IsDefaulted" Value="True" />
                            <Trigger Property="IsMouseOver" Value="True" />
                            <Trigger Property="IsPressed" Value="True" />
                            <Trigger Property="IsEnabled" Value="False" />
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </Style>
        <Style x:Key="ButtonLamMoi" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Image x:Name="Vector_Smart_Object2" Source="/ThanNhanTao;component/Images/Icons/Refresh32.png" />
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True" />
                            <Trigger Property="IsDefaulted" Value="True" />
                            <Trigger Property="IsMouseOver" Value="True" />
                            <Trigger Property="IsPressed" Value="True" />
                            <Trigger Property="IsEnabled" Value="False" />
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </Style>
    </Window.Resources>
    <Canvas x:Name="dang_nhap" HorizontalAlignment="Left" VerticalAlignment="Top" Width="490" Height="350" ClipToBounds="True">
        <Image Width="490" x:Name="blackLog" Height="310" Source="/ThanNhanTao;component/Images/BakLogin.png" Canvas.Left="0" Canvas.Top="-1" Stretch="None" />
        <Grid Margin="55 55 20 20" VerticalAlignment="Center" HorizontalAlignment="Center" Canvas.Left="41" Canvas.Top="14">
            <Grid.RowDefinitions>
                <RowDefinition Height="70"></RowDefinition>
                <RowDefinition Height="60"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="140"></ColumnDefinition>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition  Width="60"></ColumnDefinition>
                <ColumnDefinition  Width="60"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <dxe:TextEdit Grid.Column="1" NullText="Nhập tên" Grid.ColumnSpan="3"  ShowBorder="False" Grid.Row="0" Name="textBoxTen" FontSize="16" Height="30" Width="180" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
            <dxe:PasswordBoxEdit NullText="Nhập mật khẩu" Grid.Column="1" ShowBorder="False"   Grid.ColumnSpan="3" Grid.Row="1" Name="textBoxMatKhau" FontSize="16" Height="30" Width="180" VerticalAlignment="Top" HorizontalAlignment="Left" />

            <Image HorizontalAlignment="Center" Name="imaAnh" Stretch="Fill" VerticalAlignment="Center" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3"
               Width="130" Source="/ThanNhanTao;component/Images/LoginI.png" 
               />
        </Grid>
        <Button Name="imaDong" Canvas.Left="432" Canvas.Top="259" IsDefault="False" Cursor="Hand" BorderThickness="0" ClickMode="Release" Style="{DynamicResource ButtonDong}" Width="32" Height="32" Opacity="1" Click="imaDong_Click" />
        <Button Name="imaLogin" Canvas.Left="356" Canvas.Top="259" IsDefault="True" Cursor="Hand" BorderThickness="0" ClickMode="Release" Style="{DynamicResource ButtonDangNhap}" Width="32" Height="32" Opacity="1" Click="imaLogin_Click" />
        <Button Name="imaLamMoi" Canvas.Left="394" Canvas.Top="259" IsDefault="False" Cursor="Hand" BorderThickness="0" ClickMode="Release" Style="{DynamicResource ButtonLamMoi}" Width="32" Height="32" Opacity="1" Click="imaLamMoi_Click" />
    </Canvas>
    
</Window>
